package com.classtest.test3;

public class Test {
    public static void main(String[] args) {
        //创建对象蛇
        Snake snake = new Snake("蛇妖甲",5,20);
        //创建对象蜈蚣
        CentipideDemon cen = new CentipideDemon("蜈蚣乙",60,15);

        System.out.println("怪物"+snake.getName()+"展开攻击");
        System.out.println("当前生命是："+snake.getBlood());
        System.out.println("攻击力是："+snake.getAtk());
        snake.setBlood(snake.inblood(snake.getBlood()));
        System.out.println("当前生命值是："+ snake.getBlood());
        snake.moveWay();
        System.out.println("-------------------------------");
        System.out.println("怪物"+cen.getName()+"展开攻击");
        System.out.println("当前生命是："+cen.getBlood());
        System.out.println("攻击力是："+cen.getAtk());
        cen.moveWay();
    }
}
